#include <iostream>
#include <map>
#include <string>
#include <algorithm>

using namespace std;

// 比较函数
struct MyCmp : public less<string>{
	bool operator()(string l, string r) const { return strcmp(l.c_str(), r.c_str()) < 0; }
};

int main() {
	map<string, int, MyCmp> mymap;
	mymap["key"] = 0;
	mymap["aaa"] = 5;
	mymap["zaa"] = 15;

	map<string, int, MyCmp>::iterator myit = mymap.find("key");
	if (myit != mymap.end())
	{
		cout << "found!" << endl;
	}
	else 
	{
		cout << "not found!" << endl;
	}

	return 0;
}
